package com.model;

import java.util.Objects;

/**
 * @BelongsProject: study
 * @BelongsPackage: com.model
 * @Author: zhangzhanheng
 * @CreateTime: 2022-08-30  17:27
 * @Description: 面试题
 * @Version: 1.0
 */
public class User {
    private Long userId;
    private String userName;

    public Long getUserId() {
        return userId;
    }

    public String getUserName() {
        return userName;
    }

    public User(Long userId, String userName) {
        this.userId = userId;
        this.userName = userName;
    }

    @Override
    public boolean equals(Object o) {
        User user = (User) o;
        return Objects.equals(userId, user.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId);
    }
}
